package top.chukongxiang.dubboboot.simple.userservice.service;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.apache.dubbo.config.annotation.DubboService;
import top.chukongxiang.dubboboot.simple.common.model.entity.user.User;
import top.chukongxiang.dubboboot.simple.common.service.UserService;
import top.chukongxiang.dubboboot.simple.userservice.mapper.UserMapper;

/**
 * 用户服务实现
 * @author 楚孔响
 * @version 1.0
 * @date 2021/12/11 0:54
 */
@DubboService
public class UserServiceImpl extends ServiceImpl<UserMapper, User> implements UserService {

    /**
     * 根据用户名获取用户
     * @param username 用户名
     * @return 用户信息
     */
    @Override
    public User getUserInfoByUsername(String username) {

        return baseMapper.selectInfoByUsername(username);
    }
}
